package com.ruoyi.back.service.impl;

import java.util.List;

import com.ruoyi.back.domain.IndexAdvantage;
import com.ruoyi.back.mapper.IndexAdvantageMapper;
import com.ruoyi.back.service.IIndexAdvantageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 首页优势Service业务层处理
 * 
 * @author luguanqing
 * @date 2021-04-06
 */
@Service
public class IndexAdvantageServiceImpl implements IIndexAdvantageService
{
    @Autowired(required = false)
    private IndexAdvantageMapper indexAdvantageMapper;

    /**
     * 查询首页优势
     * 
     * @param id 首页优势ID
     * @return 首页优势
     */
    @Override
    public IndexAdvantage selectIndexAdvantageById(String id)
    {
        return indexAdvantageMapper.selectIndexAdvantageById(id);
    }

    /**
     * 查询首页优势列表
     * 
     * @param indexAdvantage 首页优势
     * @return 首页优势
     */
    @Override
    public List<IndexAdvantage> selectIndexAdvantageList(IndexAdvantage indexAdvantage)
    {
        return indexAdvantageMapper.selectIndexAdvantageList(indexAdvantage);
    }

    /**
     * 新增首页优势
     * 
     * @param indexAdvantage 首页优势
     * @return 结果
     */
    @Override
    public int insertIndexAdvantage(IndexAdvantage indexAdvantage)
    {
        return indexAdvantageMapper.insertIndexAdvantage(indexAdvantage);
    }

    /**
     * 修改首页优势
     * 
     * @param indexAdvantage 首页优势
     * @return 结果
     */
    @Override
    public int updateIndexAdvantage(IndexAdvantage indexAdvantage)
    {
        return indexAdvantageMapper.updateIndexAdvantage(indexAdvantage);
    }

    /**
     * 批量删除首页优势
     * 
     * @param ids 需要删除的首页优势ID
     * @return 结果
     */
    @Override
    public int deleteIndexAdvantageByIds(String[] ids)
    {
        return indexAdvantageMapper.deleteIndexAdvantageByIds(ids);
    }

    /**
     * 删除首页优势信息
     * 
     * @param id 首页优势ID
     * @return 结果
     */
    @Override
    public int deleteIndexAdvantageById(String id)
    {
        return indexAdvantageMapper.deleteIndexAdvantageById(id);
    }
}
